<% for (const api of apis) { -%>
<% const apiName = formatter.apiName(api.url, api.method, api.path) %>
<% const typeName = apiName[0].toUpperCase() + apiName.slice(1) %>
<% if (api.data) { -%>
  <% const reqtype = utils.getReqType(schemasList, 'data', api.data, 1) %>
<% if (reqtype.includes('{') && !/\]$/.test(reqtype)) { -%>
declare interface <%- typeName %>Data <%- reqtype %>
<% } else { -%>
declare type <%- typeName %>Data = <%- reqtype %>
<% } -%>
<% } else if (api.formData) { -%>
<% const reqtype = utils.getFormDataParameters(api.formData) %>
<% if (reqtype.includes('{') && !/\]$/.test(reqtype)) { -%>
declare interface <%- typeName %>Data <%- reqtype %>
<% } else { -%>
declare type <%- typeName %>Data = <%- reqtype %>
<% } -%>
<% } -%>
<% if (api.query?.length) { -%>
<% const reqtype = utils.getReqQuery(schemasList, api.query) %>
<% if (reqtype.includes('{') && !/\]$/.test(reqtype)) { -%>
declare interface <%- typeName %>Query <%- reqtype %>
<% } else { -%>
declare type <%- typeName %>Query = <%- reqtype %>
<% } -%>
<% } -%>
<% } -%>